/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sys.screen;

import java.io.IOException;
import java.sql.SQLException;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.swing.SwingConstants;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import sys.bean.ClienteBean;
import sys.bean.ProdutoPedidoBean;
import sys.dao.ClienteDao;
import sys.dao.ProdutoPedidoDao;
import sys.utils.LetterUpper;
import sys.utils.Mensagens;
import sys.utils.Utils;
import static sys.utils.Utils.codCorreto;
import static sys.utils.Utils.escClose;

/**
 *
 * @author Administrador
 */
public class UIProdutosCliente extends javax.swing.JDialog {

    NumberFormat formatoMoeda = NumberFormat.getCurrencyInstance();
    SimpleDateFormat formDataSpac = new SimpleDateFormat("yyyyMMdd");
    ClienteBean cliente;

    /**
     * Creates new form UIProdutosCliente
     *
     * @param parent
     * @param modal
     */
    public UIProdutosCliente(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
        dataInicial.setDate(new Date());
        dataFinal.setDate(new Date());
        UIManager.put("Table.alternateRowColor", new java.awt.Color(230, 255, 255));
        escClose(this);
        txCodigoCliente.requestFocus();
        Utils.maximizarDialog(this);
    }

    public UIProdutosCliente(java.awt.Dialog parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
        dataInicial.setDate(new Date());
        dataFinal.setDate(new Date());
        UIManager.put("Table.alternateRowColor", new java.awt.Color(230, 255, 255));
        escClose(this);
        txCodigoCliente.requestFocus();
        Utils.maximizarDialog(this);
    }

    public String formatoMoeda(double valor) {
        return formatoMoeda.format(valor).replace("R$", "");
    }

    private String txConsultaProduto() {

        String pParte = "";
        String uParte = "";
        String tx = txDescProduto.getText();

        String[] sql = tx.split(" ");

        int cont = 0;
        for (String conteudoTxproduto : sql) {
            if (cont == 0) {
                pParte += "AND C01DESC LIKE '%" + conteudoTxproduto + "%' ";
            }
            if (cont > 0) {
                uParte += "AND C01DESC LIKE '%" + conteudoTxproduto + "%' ";
            }
            cont++;
        }
        return pParte + uParte + " AND C01FLAG = 'A' ORDER BY C01DESC";

    }

    private void loadSearch() {
        UIPesquisaCliente pCliente = new UIPesquisaCliente(this, true);
        pCliente.setVisible(true);
    }

    private void aTabelaProdClientes() {

        DefaultTableModel modelo = (DefaultTableModel) tabelaProdCliente.getModel();
        modelo.setNumRows(0);
        try {
            List<ProdutoPedidoBean> listaProdClientes = ProdutoPedidoDao.produtosClientePeriodo(formDataSpac.format(dataInicial.getDate()), formDataSpac.format(dataFinal.getDate()), txCodigoCliente.getText(), txConsultaProduto());

            for (ProdutoPedidoBean iPed : listaProdClientes) {
                modelo.addRow(new Object[]{
                    iPed.getPedido().getPedido(), iPed.getPedido().getData(), iPed.getPedido().getCliente().getNome(), iPed.getPedido().getProduto().getCodigoBarras(),
                    iPed.getPedido().getProduto().getDescricao(), formatoMoeda(iPed.getQtdProdutoCompra()),
                    formatoMoeda.format(iPed.getPvenda()), formatoMoeda.format((iPed.getQtdProdutoCompra() * iPed.getPvenda()))
                });
            }

            tabelaProdCliente.requestFocus();
            tabelaProdCliente.changeSelection(0, 9, false, false);

            DefaultTableCellRenderer centralizado = new DefaultTableCellRenderer();
            centralizado.setHorizontalAlignment(SwingConstants.CENTER);
            tabelaProdCliente.getColumnModel().getColumn(0).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(1).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(3).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(5).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(7).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(8).setCellRenderer(centralizado);
            tabelaProdCliente.getColumnModel().getColumn(9).setCellRenderer(centralizado);

        } catch (SQLException | IOException ex) {
            Mensagens.msgErro("erro\n" + ex.getMessage());
        }
    }

    public void preencheCampos() {
        try {
            cliente = ClienteDao.consultaCliente(codCorreto(txCodigoCliente.getText(), 5));
            txCodigoCliente.setText(cliente.getCodigo());
            txNomeCliente.setText(cliente.getNome());

        } catch (SQLException | IOException ex) {
            Mensagens.msgErro("erro ao carregar dados do cliente\n" + ex.getMessage());
        }
    }

    private void buscar() {
        final BarraProgresso pb = new BarraProgresso(this);
        SwingWorker worker = new SwingWorker() {

            @Override
            protected Object doInBackground() throws Exception {
                pb.gerarJanela();
                pb.lbDescricao.setText("BUSCANDO, POR FAVOR AGUARDE...");
                aTabelaProdClientes();
                return null;
            }

            @Override
            protected void done() {
                pb.fechar();
            }
        };
        worker.execute();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jpDados = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        dataInicial = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/#####", '_');
        dataFinal = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/#####", '_');
        jpDados1 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        txCodigoCliente = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        txNomeCliente = new javax.swing.JTextField();
        lbRazao = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txDescProduto = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        btnSair = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabelaProdCliente = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("PRODUTOS X CLIENTES");

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jpDados.setBackground(new java.awt.Color(255, 255, 255));
        jpDados.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "PERÍODO:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel2.setText("DATA INICIAL:");

        jLabel3.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel3.setText("DATA FINAL:");

        dataInicial.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        dataFinal.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        javax.swing.GroupLayout jpDadosLayout = new javax.swing.GroupLayout(jpDados);
        jpDados.setLayout(jpDadosLayout);
        jpDadosLayout.setHorizontalGroup(
            jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDadosLayout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(dataInicial, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3)
                    .addComponent(dataFinal, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jpDadosLayout.setVerticalGroup(
            jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpDadosLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(1, 1, 1)
                .addGroup(jpDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(dataInicial, javax.swing.GroupLayout.DEFAULT_SIZE, 22, Short.MAX_VALUE)
                    .addComponent(dataFinal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(14, 14, 14))
        );

        jpDados1.setBackground(new java.awt.Color(255, 255, 255));
        jpDados1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DADOS DO CLIENTE:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel4.setText("CODIGO:");

        txNomeCliente.setDocument(new LetterUpper());
        txCodigoCliente.setBackground(new java.awt.Color(245, 245, 245));
        txCodigoCliente.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        txCodigoCliente.setForeground(new java.awt.Color(51, 51, 255));
        txCodigoCliente.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txCodigoCliente.setBorder(null);
        txCodigoCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txCodigoClienteActionPerformed(evt);
            }
        });
        txCodigoCliente.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txCodigoClienteKeyReleased(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/find-2.png"))); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        txNomeCliente.setDocument(new LetterUpper());
        txNomeCliente.setEditable(false);
        txNomeCliente.setBackground(new java.awt.Color(245, 245, 245));
        txNomeCliente.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        txNomeCliente.setForeground(new java.awt.Color(51, 51, 255));
        txNomeCliente.setBorder(null);

        lbRazao.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        lbRazao.setText("NOME:");

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel6.setText("DESCRIÇÃO PRODUTO:");

        txDescProduto.setDocument(new LetterUpper());
        txDescProduto.setBackground(new java.awt.Color(245, 245, 245));
        txDescProduto.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        txDescProduto.setForeground(new java.awt.Color(51, 51, 255));
        txDescProduto.setBorder(null);
        txDescProduto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txDescProdutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpDados1Layout = new javax.swing.GroupLayout(jpDados1);
        jpDados1.setLayout(jpDados1Layout);
        jpDados1Layout.setHorizontalGroup(
            jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDados1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txCodigoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbRazao)
                    .addComponent(txNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDados1Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(0, 175, Short.MAX_VALUE))
                    .addComponent(txDescProduto))
                .addContainerGap())
        );
        jpDados1Layout.setVerticalGroup(
            jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDados1Layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txDescProduto, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jpDados1Layout.createSequentialGroup()
                        .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbRazao)
                            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(1, 1, 1)
                        .addGroup(jpDados1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txCodigoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txNomeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jButton1))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));
        jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));

        jButton2.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/find-2.png"))); // NOI18N
        jButton2.setText("BUSCAR");
        jButton2.setPreferredSize(new java.awt.Dimension(120, 30));
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel4.add(jButton2);

        btnSair.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        btnSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/sair.png"))); // NOI18N
        btnSair.setText("SAIR");
        btnSair.setPreferredSize(new java.awt.Dimension(120, 30));
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        jPanel4.add(btnSair);

        tabelaProdCliente.setAutoCreateRowSorter(true);
        tabelaProdCliente.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        tabelaProdCliente.setForeground(new java.awt.Color(51, 51, 255));
        tabelaProdCliente.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "PEDIDO", "DATA PEDIDO", "CLIENTE", "CODIGO ITEM", "DESCRICAO ITEM", "QTD", "UNT", "TOTAL"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabelaProdCliente.setGridColor(new java.awt.Color(204, 204, 204));
        jScrollPane1.setViewportView(tabelaProdCliente);
        if (tabelaProdCliente.getColumnModel().getColumnCount() > 0) {
            tabelaProdCliente.getColumnModel().getColumn(2).setPreferredWidth(230);
            tabelaProdCliente.getColumnModel().getColumn(4).setPreferredWidth(230);
        }

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jpDados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jpDados1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jpDados1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jpDados, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        buscar();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void txCodigoClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txCodigoClienteActionPerformed
        if (txCodigoCliente.getText().equals("")) {
            loadSearch();
        } else {
            preencheCampos();
        }
    }//GEN-LAST:event_txCodigoClienteActionPerformed

    private void txCodigoClienteKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txCodigoClienteKeyReleased
        if (txCodigoCliente.getText().equals("")) {
            txNomeCliente.setText("");
        }
    }//GEN-LAST:event_txCodigoClienteKeyReleased

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        loadSearch();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnSairActionPerformed

    private void txDescProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txDescProdutoActionPerformed
        buscar();
    }//GEN-LAST:event_txDescProdutoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSair;
    private com.toedter.calendar.JDateChooser dataFinal;
    private com.toedter.calendar.JDateChooser dataInicial;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel jpDados;
    private javax.swing.JPanel jpDados1;
    private javax.swing.JLabel lbRazao;
    private javax.swing.JTable tabelaProdCliente;
    public javax.swing.JTextField txCodigoCliente;
    private javax.swing.JTextField txDescProduto;
    public javax.swing.JTextField txNomeCliente;
    // End of variables declaration//GEN-END:variables
}
